import { createRouter, createWebHistory } from 'vue-router';
import Browse from './../view/browse/index.jsx';
import Iframe from './../view/iframe/index.vue';
import Index from './../view/index/index.vue';
import Main from './../view/main/index.vue';

const routes = [
    {
        path: '/',
        redirect: '/index',
        children: [
            {
                path: '/index',
                component: Index,
                name: 'index',
                children: [
                    {
                        path: '/index',
                        component: Main,
                        name: 'main'
                    }
                ]
            }
        ]
    },
    {
        path: '/browse',
        name: 'browse',
        component: Browse,
    },
    {
        path: '/iframe',
        name: 'iframe',
        component: Iframe,
    },
]

const router = createRouter({
    history: createWebHistory(),
    routes: routes
})

export default router